<!-- 必须全局拥有唯一的id -->
<div id="WfTaskpoolList">
    <el-form-q form="query" :field-data="queryFields" search-table="WfTaskPoolList" :buttons="WfTaskPoolButtons"></el-form-q>
    <div class="yu-toolBar">
        <el-button-group>
            <el-button icon="add" @click="openCreateFn" >新增</el-button>
            <el-button  icon="edit" @click="openEditFn" >修改</el-button>
            <el-button  icon="delete"  @click="deleteFn" >删除</el-button>
            <el-button icon="edit" @click="openDetailFn" >查看</el-button>
            <el-button icon="edit" @click="openDutyFn" >关联岗位设置</el-button>
        </el-button-group>
    </div>
    <el-table-x ref="WfTaskPoolList"  :max-height="height"
                :data-url="urls.dataUrl" :base-params="dataParams" :table-columns="tableColumns" >
    </el-table-x>

    <el-dialog-x :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible"  height="370px" width="700px" @close="beforeClose">
        <el-form-x ref="WfTaskPoolForm" :group-fields="updateFields" :disabled="formDisabled" label-width="110px"></el-form-x>
        <div slot="footer" align="center">
            <el-button type="primary" @click="dialogFormVisible = false">关闭</el-button>
            <el-button v-if="dialogStatus=='creat'" type="primary" @click="saveCreateFn()">确 定</el-button>
            <el-button v-if="dialogStatus=='update'" type="primary" @click="saveEditFn()">确 定</el-button>
        </div>
    </el-dialog-x>

    <!--关联岗位设置-->
    <el-dialog-x :title="DutyTitle" :visible.sync="dialogVisibleDuty" height="360px" width="550px"  @close="beforeCloseDuty">
        <el-form ref="checkDutyForm" :model="checkDutyForm"  label-width="110px">
            <el-form-item label="已选岗位">
                <el-checkbox-group v-model="checkList">
                    <el-checkbox v-for="item in checkDutyList" :label="item.dutyCde" :key="item.dutyCde"  :disabled="true" :checked="true">{{item.dutyName}}</el-checkbox>
                </el-checkbox-group>
            </el-form-item>
        </el-form>
        <el-table-x ref="DutyList" :checkbox="checkbox" :data-url="urls.DutyUrl" :pageable="false" :base-params="DutyParams" :table-columns="DutyTableColumns" >
        </el-table-x>
        <div slot="footer" align="center">
            <el-button type="primary" @click="beforeCloseDuty">关闭</el-button>
            <el-button type="primary" @click="saveDuty">确定</el-button>
        </div>
    </el-dialog-x>

</div>